add an "attributes" property to the text renderer for ATK.
authorJonathan Blandford <jrb@redhat.com>
Fri, 27 Jul 2001 15:34:42 +0000 (15:34 +0000)
committerJonathan Blandford <jrb@src.gnome.org>
Fri, 27 Jul 2001 15:34:42 +0000 (15:34 +0000)
Fri Jul 27 11:31:15 2001  Jonathan Blandford  <jrb@redhat.com>

* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_get_property):
add an "attributes" property to the text renderer for ATK.

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkcellrenderertext.c

index 272b4ddcb56a900812b3c28243fb8b356a308675..b2a58fddf804259f9e07da1fc0d41f9b7198949a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri Jul 27 11:31:15 2001  Jonathan Blandford  <jrb@redhat.com>
+
+       * gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_get_property):
+       add an "attributes" property to the text renderer for ATK.
+
 2001-07-26  Alex Larsson  <alexl@redhat.com>
 
        * gdk/linux-fb/gdkimage-fb.c (_gdk_fb_get_image):
index 272b4ddcb56a900812b3c28243fb8b356a308675..b2a58fddf804259f9e07da1fc0d41f9b7198949a 100644 (file)
@@ -1,3 +1,8 @@
+Fri Jul 27 11:31:15 2001  Jonathan Blandford  <jrb@redhat.com>
+
+       * gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_get_property):
+       add an "attributes" property to the text renderer for ATK.
+
 2001-07-26  Alex Larsson  <alexl@redhat.com>
 
        * gdk/linux-fb/gdkimage-fb.c (_gdk_fb_get_image):
index 272b4ddcb56a900812b3c28243fb8b356a308675..b2a58fddf804259f9e07da1fc0d41f9b7198949a 100644 (file)
@@ -1,3 +1,8 @@
+Fri Jul 27 11:31:15 2001  Jonathan Blandford  <jrb@redhat.com>
+
+       * gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_get_property):
+       add an "attributes" property to the text renderer for ATK.
+
 2001-07-26  Alex Larsson  <alexl@redhat.com>
 
        * gdk/linux-fb/gdkimage-fb.c (_gdk_fb_get_image):
index 272b4ddcb56a900812b3c28243fb8b356a308675..b2a58fddf804259f9e07da1fc0d41f9b7198949a 100644 (file)
@@ -1,3 +1,8 @@
+Fri Jul 27 11:31:15 2001  Jonathan Blandford  <jrb@redhat.com>
+
+       * gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_get_property):
+       add an "attributes" property to the text renderer for ATK.
+
 2001-07-26  Alex Larsson  <alexl@redhat.com>
 
        * gdk/linux-fb/gdkimage-fb.c (_gdk_fb_get_image):
index 272b4ddcb56a900812b3c28243fb8b356a308675..b2a58fddf804259f9e07da1fc0d41f9b7198949a 100644 (file)
@@ -1,3 +1,8 @@
+Fri Jul 27 11:31:15 2001  Jonathan Blandford  <jrb@redhat.com>
+
+       * gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_get_property):
+       add an "attributes" property to the text renderer for ATK.
+
 2001-07-26  Alex Larsson  <alexl@redhat.com>
 
        * gdk/linux-fb/gdkimage-fb.c (_gdk_fb_get_image):
index 272b4ddcb56a900812b3c28243fb8b356a308675..b2a58fddf804259f9e07da1fc0d41f9b7198949a 100644 (file)
@@ -1,3 +1,8 @@
+Fri Jul 27 11:31:15 2001  Jonathan Blandford  <jrb@redhat.com>
+
+       * gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_get_property):
+       add an "attributes" property to the text renderer for ATK.
+
 2001-07-26  Alex Larsson  <alexl@redhat.com>
 
        * gdk/linux-fb/gdkimage-fb.c (_gdk_fb_get_image):
index 272b4ddcb56a900812b3c28243fb8b356a308675..b2a58fddf804259f9e07da1fc0d41f9b7198949a 100644 (file)
@@ -1,3 +1,8 @@
+Fri Jul 27 11:31:15 2001  Jonathan Blandford  <jrb@redhat.com>
+
+       * gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_get_property):
+       add an "attributes" property to the text renderer for ATK.
+
 2001-07-26  Alex Larsson  <alexl@redhat.com>
 
        * gdk/linux-fb/gdkimage-fb.c (_gdk_fb_get_image):
index 24043e129106f003b7e77d724b3a36abb0b1198c..ad94655ab62d7058a3bc246fb22abaff33742908 100644 (file)
@@ -55,6 +55,7 @@ enum {
 
   PROP_TEXT,
   PROP_MARKUP,
+  PROP_ATTRIBUTES,
   
   /* Style args */
   PROP_BACKGROUND,
@@ -162,6 +163,14 @@ gtk_cell_renderer_text_class_init (GtkCellRendererTextClass *class)
                                                         _("Marked up text to render"),
                                                         NULL,
                                                         G_PARAM_WRITABLE));
+
+  g_object_class_install_property (gobject_class,
+                                  PROP_ATTRIBUTES,
+                                  g_param_spec_boxed ("attributes",
+                                                      _("Attributes"),
+                                                      _("A list of style attributes to apply to the text of the renderer."),
+                                                      PANGO_TYPE_ATTR_LIST,
+                                                      G_PARAM_READWRITE));
   
   g_object_class_install_property (object_class,
                                    PROP_BACKGROUND,
@@ -412,7 +421,11 @@ gtk_cell_renderer_text_get_property (GObject        *object,
     case PROP_TEXT:
       g_value_set_string (value, celltext->text);
       break;
-      
+
+    case PROP_ATTRIBUTES:
+      g_value_set_boxed (value, celltext->extra_attrs);
+      break;
+
     case PROP_BACKGROUND_GDK:
       {
         GdkColor color;
@@ -693,7 +706,14 @@ gtk_cell_renderer_text_set_property (GObject      *object,
       celltext->text = g_strdup (g_value_get_string (value));
       g_object_notify(G_OBJECT(object), "text");
       break;
-      
+
+    case PROP_ATTRIBUTES:
+      if (celltext->extra_attrs)
+       pango_attr_list_unref (celltext->extra_attrs);
+
+      celltext->extra_attrs = g_value_get_boxed (value);
+      pango_attr_list_ref (celltext->extra_attrs);
+      break;
     case PROP_MARKUP:
       {
        const gchar *str;